Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - test_feature_activation_loaded_programs_recompilation_phase() #35299

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Feb 23, 2024

Problem

The test currently does skip most of the epoch so the recompilation phase only starts after the epoch boundary. Also, it does only have a single slot after the epoch boundary which does only select programs for recompilation but never recompiles a selected program, as that would take another slot.

Summary of Changes

Insert two slots mid epoch to start the recompilation phase and recompile the program, both before the epoch boundary.

@Lichtso Lichtso added the v1.18 PRs that should be backported to v1.18 label Feb 23, 2024
Copy link
Contributor

mergify bot commented Feb 23, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (6ee3bb9) to head (d2e801a).
Report is 14 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #35299    +/-   ##
========================================
  Coverage    81.7%    81.8%            
========================================
  Files         834      834            
  Lines      224299   224852   +553     
========================================
+ Hits       183361   183937   +576     
+ Misses      40938    40915    -23     

@pgarg66
Copy link
Contributor

pgarg66 commented Feb 27, 2024

Looks good to me. Let's also give @alessandrod a chance to take a look before merging it.

@pgarg66
Copy link
Contributor

pgarg66 commented Feb 27, 2024

Also, is it needed on v1.18? We are limiting backports to a minimum, but given this is a test-only modification, maybe its ok.

@Lichtso
Copy link
Contributor Author

Lichtso commented Feb 27, 2024

Given that a bunch of RBPF feature activations are queue up and will happen when v1.18 is on MNB, yes I would like the test fixed there as well.

@alessandrod
Copy link
Contributor

This test was passing before without running the recompilation phase, it's passing now with the recompilation phase (presumably!) running, but we haven't added any new asserts so we're not testing that it's actually running?

…o trigger the recompilation phase before the epoch boundary.
@Lichtso Lichtso force-pushed the fix/test_feature_activation_loaded_programs_recompilation_phase branch from a72a4dc to 4dbf912 Compare February 28, 2024 22:43
@Lichtso Lichtso force-pushed the fix/test_feature_activation_loaded_programs_recompilation_phase branch from 4dbf912 to d2e801a Compare February 28, 2024 22:49
@Lichtso
Copy link
Contributor Author

Lichtso commented Feb 28, 2024

@alessandrod I added more assertions that directly test for the presence of entries with the current / upcoming environment. Better now?

@pgarg66
Copy link
Contributor

pgarg66 commented Mar 1, 2024

@alessandrod can you please re-review?

@pgarg66 pgarg66 merged commit ccc6a6b into solana-labs:master Mar 2, 2024
35 checks passed
mergify bot pushed a commit that referenced this pull request Mar 2, 2024
…#35299)

* Fixes test_feature_activation_loaded_programs_recompilation_phase() to trigger the recompilation phase before the epoch boundary.

* Adds a direct check of the cached entries around recompilation.

(cherry picked from commit ccc6a6b)

# Conflicts:
#	program-runtime/src/loaded_programs.rs
@Lichtso Lichtso deleted the fix/test_feature_activation_loaded_programs_recompilation_phase branch March 2, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.18 PRs that should be backported to v1.18
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants